# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=splix
_pkgver=2.0.0
reporev=315
pkgver=${_pkgver}_svn$reporev
pkgrel=0
pkgdesc="CUPS drivers for SPL (Samsung Printer Language) printers."
url="http://splix.ap2c.org/"
arch="" # Needs to be snapshotted
license="GPL-2.0-only"
makedepends="
	cups-dev
	jbigkit-dev
	subversion
	rsync
	"
install="$pkgname.post-install"
source="
	https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
	splix-deviceID.patch
	"
svnurl="svn://svn.code.sf.net/p/splix/code/splix"
disturl="dev.alpinelinux.org:/archive/$pkgname/"
builddir="$srcdir/$pkgname"
options="!check" # No test suite

snapshot() {
	clean
	deps
	mkdir -p "$srcdir"
	cd "$srcdir"
	svn co -r $reporev "$svnurl" $pkgname
	rm -rf $pkgname/.svn
	tar czvf $SRCDEST/$pkgname-$pkgver.tar.gz $pkgname
	rsync --progress -La $SRCDEST/$pkgname-$pkgver.tar.gz $disturl
}

build() {
	export CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
	make drv
	make all DRV_ONLY=1
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install DRV_ONLY=1
}

sha512sums="34e9cd193e30b30d3d4bff2a2b2d78b022f41a0642e4a71db9150d9222284f731b64ea9903911e271b65ef18dc501848e945852774aa790ce8331dede8bcb088  splix-2.0.0_svn315.tar.gz
6d869435a7e3faf9cb7f18b008b9ec1a3884efc6e2bb11a6c51bc54b08b283b04de9cc41c96e1c7c693e1fb6cbd79c1eb16de8ea896458034c72224dd3758fd4  splix-deviceID.patch"
